Conversation
This comment has been minimized.
This comment has been minimized.
| ... | ||
|
|
||
| b: B | ||
| # We use dummy type info, so no real attrs will be there: |
There was a problem hiding this comment.
That's pretty unfortunate, can we make it inherit from Any or just skip the duplicate base instead?
This comment has been minimized.
This comment has been minimized.
hauntsaninja
left a comment
There was a problem hiding this comment.
This looks good to me!
One possible improvement here could be to deduplicate the base classes when calculating MRO, so instead of Any MRO we still get the MRO as if the base class was unduplicated.
|
@hauntsaninja I don't fill comfortable doing this. Because we can have two generic bases: |
|
Okay! I went ahead and added a test case for that situation |
|
Diff from mypy_primer, showing the effect of this PR on open source code: vision (https://github.com/pytorch/vision) got 1.36x slower (40.8s -> 55.5s)
|
@JelleZijlstra I don't really have a prefence on this issue. I am fine with both blocking and non-blocking errors here.
But, it looks like that making this non-blocking is quite straight-forward.
Closes #15349